home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jul 90 / MacApp.Tech$ 7⁄13⁄90 / 1588-Wrapping TEditText..-Jul90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.0 KB  |  50 lines  |  [TEXT/GEOL]

  1. Item    8834624                         12-July-90        12:59PDT
  2.  
  3. From:   VERITY                          Verity, Bob Williams,PRT
  4.  
  5. To:     MACDTS                          Macintosh Developer Tech Supt
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    Wrapping TEditText...
  9.  
  10. Hi,
  11.  
  12. I am having trouble getting TEditText to auto-wrap, as advertized in the MacApp
  13. source code and the 2.0 Final change document.  I've tried it two ways - (1)
  14. overriding TEditText and calling ChangeWrap after calling IEditText and (2) not
  15. overriding, and calling ChangeWrap after calling IEditText.  In both cases, as
  16. soon as I click in the TEditText to activate it, I get an error from
  17. TApplication.TrackCursor:
  18.  
  19. "Whoops, cursor region was not correctly calculated.
  20. global cursor = (h:197,v:69) gCursorRgn^^.rgnBBox = (l:0, t:0)/(r:0, b:0)
  21. ProgramBreak: The cursor is not in the cursor region at end of
  22. TApplication.TrackCursor!"
  23.  
  24. I've traced through the code, and the reason gCursorRgn is set to (0,0,0,0) is
  25. because of the following snippet from TApplication.TrackCursor:
  26.  
  27.    { Intersect with visible region }
  28.    SectRgn(thePort^.visRgn, gCursorRgn, gCursorRgn);
  29.    SectRgn(thePort^.clipRgn, gCursorRgn, gCursorRgn);
  30.  
  31.  
  32. In the case where I have set fAutoWrap to true, thePort^.visRgn is (0,0,0,0),
  33. and gCursorRgn (which wasn't (0,0,0,0) before the first SectRgn call) gets
  34. blown away.  This error doesn't happen if I don't call ChangeWrap to set
  35. fAutoWrap to true, but I can't figure out what in the code is causing the
  36. visRgn to get set to (0,0,0,0) - unless this is a side-effect of debugging with
  37. SADE.
  38.  
  39. So, am I doing something wrong, or is MacApp?  Does MacApp 2.0 Final really
  40. support multi-line, auto-wrapping TEditText's, or is that just a rumor
  41. propagated by comments in the code and in the release notes?  If it does
  42. support it, has anyone gotten it to work?  Am I barking up the wrong tree, and
  43. should I start looking at the views that contain this particular TEditText?
  44.  
  45. Anders Wallgren
  46. Verity, Inc.
  47. Applelink: VERITY
  48.  
  49.  
  50.